
<table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light">
          <td class="text-top">.:. Đầu mối liên lạc</td>
        </tr>
      </tbody></table>
      <table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light"> 
          <td class="t-l"></td>
          <td class="t-c"></td>
          <td class="t-r"></td>
        </tr>
        <tr class="light">
          <td class="c-l"></td>
          <td class="c-c" valign="top">
  
    <div class="clear" style="height:10px"></div>
<?php 
	$search=$_POST['TenKh'];
	$loaiKh=$_POST['loaiKh'];
	$DonViQl=$_POST['DonViQl'];
?>
<?php 
	$kh_id=$_GET['kh_id'];
	$sqlstring="select  
						daumoilienlac.id as dmll_id,
						daumoilienlac.name,
						daumoilienlac.khachhang_id,
						daumoilienlac.chucvu,
						daumoilienlac.telephone,
						daumoilienlac.mobile,
						daumoilienlac.email,
						daumoilienlac.update_time,
						customers.id,
						customers.name_kh,
						customers.name_com
					from 
						daumoilienlac
						inner join customers
						on daumoilienlac.khachhang_id = customers.id
					where khachhang_id='$kh_id'
					";

	
	$qr1=mysql_query($sqlstring); 
	$i=0;
  ?>
<table id="box-quick" class="box-quick" border="0" cellpadding="5" cellspacing="0" width="100%">
          <tbody><tr id="title">
            <td width="2%">STT</td>
            <td width="15%">Họ tên</td>
            <td width="15%">Tên khách hàng</td>
            <td width="10%">Chức vụ</td>
            <td width="10%">Điện thoại</td>
            <td width="10%">Email</td>
            <td width="10%">Ngày cập nhật</td>
            <td width="6%">Thao tác</td>
          </tr>
         <?php 
		 	while($row=mysql_fetch_array($qr1)) 
			{
				$i=$i+1;
				$ids=$row['id'];				
		 ?>
           <tr class="light" id="value" style="cursor:pointer;" onmouseover="mouse_den(this)" onmouseout="mouse_di(this)" bgcolor="">
            <td style="border-left:1px solid #ccc"><div align="center"><?php echo $i;?></div></td>
            <td  class="tdbg_2"><div align="left">&nbsp;<span title="">
				<a href="index.php?tn=customers&kh=Dmll_detail&id=<?php echo $row['dmll_id'];?>"><?php echo $row['name'];?></a>
                 </span>
                </div>
            </td>
            <td><?php if($row['name_kh']==""){echo $row['name_com'];}else{echo $row['name_kh'];}?> </td>
           <td align="center"> <?php echo $row['chucvu']?> </td>
             <td><div align="center">&nbsp;<?php if($row['telephone']==""){echo $row['mobile'];}else{echo $row['telephone'];}?></div></td>
            <td>
            	<div align="center" style="color:#090;">
					<?php 
						echo $row['email'];
					?>
            	</div>
            </td>
            <td align="center"> <?php echo date('d/m/Y h:i a',$row["update_time"]);?> </td>
             
             <td align="center">          	
				<a onmouseout="menuLayers.hide();" onclick="menuLayers.show('<?php echo $row['dmll_id'];?>_action_kh', event); "><img width="16" align="absmiddle" src="../skins/images/Thao_Tac_list.png"></a>
													
			
													
                &nbsp;
                            
             </td>
          </tr>
        <div id="<?php echo $row['dmll_id'];?>_action_kh" class="layermask" style="left: 1008px; top: 112px; visibility: hidden;">
	<ul>
        <li onclick="window.location='index.php?tn=customers&kh=Dmll_edit&id=<?php echo $row['dmll_id'];?>';" style="cursor:pointer;"><img src="../skins/images/edit.png" style="float: left"> <p>Sửa</p>
        </li>
        <li onclick="if(confirm('Bạn muốn xóa đầu mối liên lạc này không?')){window.location='index.php?tn=customers&kh=Dmll_del&id=<?php echo $row['dmll_id'];?>';}" style="cursor:pointer;">
        <img src="../skins/images/del.png" style="float: left"> <p>Xóa</p>
        </li>
       
	</ul>				
</div>  

         <?php }?>
         
          
        </tbody>
	</table>

<div id="3_action_kh_view" class="layermask" style="left: 1053px; top: 190px; visibility: hidden;">													
<ul>
		<li onclick="javascript:window.location='http://tamnguyen.gencrm.com/modules/customers/edit?&amp;view=1&amp;p=3&amp;tab=3'" style="cursor:pointer;"><img src="http://tamnguyen.gencrm.com/images/icons/danh-sach.gif" style="float: left"> <p>Đầu mối liên lạc&nbsp; (1)</p>
	</li>
		<li onclick="javascript:window.location='http://tamnguyen.gencrm.com/modules/customers/edit?&amp;view=1&amp;p=3&amp;tab=4'" style="cursor:pointer;"><img src="http://tamnguyen.gencrm.com/images/icons/danh-sach.gif" style="float: left"> <p>Cơ hội bán hàng&nbsp; (0)</p>
	</li>
	<li onclick="javascript:window.location='http://tamnguyen.gencrm.com/modules/customers/edit?&amp;view=1&amp;p=3&amp;tab=5'" style="cursor:pointer;"><img src="http://tamnguyen.gencrm.com/images/icons/danh-sach.gif" style="float: left"> <p>Hợp đồng&nbsp; (0)</p>
	</li>
	<li onclick="javascript:window.location='http://tamnguyen.gencrm.com/modules/customers/edit?&amp;view=1&amp;p=3&amp;tab=6'" style="cursor:pointer;"><img src="http://tamnguyen.gencrm.com/images/icons/danh-sach.gif" style="float: left"> <p>Công việc&nbsp; (0)</p>
</li></ul>												
</div>
      
        </td>
      
      
 <td class="c-r"></td>
        </tr>
        <tr class="light">
          <td class="b-l"></td>
          <td class="b-c"></td>
          <td class="b-r"></td>
        </tr>
      </tbody></table>